﻿
//Author: 张亚涛
//createtime:2011-10-13 10:31:29
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Model
{
    public partial class CouponsScheme
    {
        public CouponsScheme()
        { }
        public CouponsScheme(IDataReader reader)
        {
            _schemeID = int.Parse(reader["SchemeID"].ToString());
            if (reader["CouponName"] != DBNull.Value)
            {
                _couponName = reader["CouponName"].ToString();
            }
            if (reader["Quantity"] != DBNull.Value)
            {
                _quantity = int.Parse(reader["Quantity"].ToString());
            }
            if (reader["OldPrice"] != DBNull.Value)
            {
                _oldPrice = decimal.Parse(reader["OldPrice"].ToString());
            }
            if (reader["PrePrice"] != DBNull.Value)
            {
                _prePrice = decimal.Parse(reader["PrePrice"].ToString());
            }
            if (reader["ValidDays"] != DBNull.Value)
            {
                _validDays = int.Parse(reader["ValidDays"].ToString());
            }
            if (reader["Scope"] != DBNull.Value)
            {
                _scope = reader["Scope"].ToString();
            }
            if (reader["Explain"] != DBNull.Value)
            {
                _explain = reader["Explain"].ToString();
            }
        }

        #region 数据库字段
        private int _schemeID;
        private string _couponName;
        private int _quantity;
        private decimal _oldPrice;
        private decimal _prePrice;
        private int _validDays;
        private string _scope;
        private string _explain;
        #endregion

        #region 字段属性
        /// <summary>
        /// 洗车券套餐ID
        /// </summary>
        public int SchemeID
        {
            set { _schemeID = value; }
            get { return _schemeID; }
        }
        /// <summary>
        /// 洗车券套餐名称
        /// </summary>
        public string CouponName
        {
            set { _couponName = value; }
            get { return _couponName; }
        }
        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity
        {
            set { _quantity = value; }
            get { return _quantity; }
        }
        /// <summary>
        /// 原价
        /// </summary>
        public decimal OldPrice
        {
            set { _oldPrice = value; }
            get { return _oldPrice; }
        }
        /// <summary>
        /// 折扣价
        /// </summary>
        public decimal PrePrice
        {
            set { _prePrice = value; }
            get { return _prePrice; }
        }
        /// <summary>
        /// 有效天数
        /// </summary>
        public int ValidDays
        {
            set { _validDays = value; }
            get { return _validDays; }
        }
        /// <summary>
        /// 使用范围
        /// </summary>
        public string Scope
        {
            set { _scope = value; }
            get { return _scope; }
        }
        /// <summary>
        /// 说明
        /// </summary>
        public string Explain
        {
            set { _explain = value; }
            get { return _explain; }
        }

        #endregion
    }
}